package com.atguigu.spzx.service.config;

import com.atguigu.spzx.service.interceptor.UserInfoLoginAuthInterceptor;
import jakarta.annotation.Resource;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * ClassName: UserInfoWebMvcConfiguration
 * Package: com.atguigu.spzx.service.config
 * Description:
 *
 * @Author 刘强
 * @Create 2024/7/16 19:57
 * @Version 1.0
 */

public class UserInfoWebMvcConfiguration implements WebMvcConfigurer {
    @Resource
    private UserInfoLoginAuthInterceptor userInfoLoginAuthInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(userInfoLoginAuthInterceptor)
                .addPathPatterns("/api/**");
    }
}
